import java.util.Timer;
import java.util.TimerTask;

/**
 * Created with IntelliJ IDEA.
 * Description:
 */
public class Demo3 {
    public static void main(String[] args) throws InterruptedException {
        Timer timer = new Timer(true);
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("Hello, world!");
            }
    }, 3000);
        Thread.sleep(10000);
    }
}
